import pandas as pd
import numpy as np
from accuracy import RMSE, MAE, MAPE, R_square


datapr = pd.read_csv('v92.csv')
datapr1 = np.array(datapr)[:, 2:]
y_pre = np.sum(datapr1, axis=1)
y_pre = y_pre.reshape(-1, 1)
datare = pd.read_csv('trainSunData.csv')
datare.fillna(method='pad', inplace=True)
y_rel = np.array(datare['Power'][-len(y_pre):]).reshape(-1, 1)
y_pre = np.array(y_pre).reshape(len(y_pre),)
y_rel = np.array(y_rel).reshape(len(y_pre),)
hho_lstm_mae = MAE(y_rel, y_pre)
hho_lstm_rmse = RMSE(y_rel, y_pre)
hho_lstm_mape = MAPE(y_rel, y_pre)
hho_lstm_R = R_square(y_rel, y_pre)
print('MAE：', hho_lstm_mae)
print('RMSE：', hho_lstm_rmse)
print('MAPE：', hho_lstm_mape)
print('R方：',hho_lstm_R)